<!DOCTYPE html>
<html lang="zh-cn">
    <head>
        <meta charset="UTF-8"/>
        <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
        <title>视差动画</title>
        <style>
            html { overflow: hidden; }
            .show { padding-bottom: 0; }
            .demo {
                perspective: 1px; padding: 0; height: 600px; height: calc(100vh - 300px); overflow: auto;
            }
            h3,h5,pre,.article_new {
                position: relative; z-index: 1;
            }
            h5,pre {
                background-color: #fff;
            }
            .box {
                height: 1280px;
                transform-style: preserve-3d;
                position: relative;
            }
            .iphone {
                position: absolute; left: 50%;
                transform: translate3D(-50%, -120px, -1px) scale(2);
                transform: translate3D(-50%, 160px, -1px) scale(1)\0;
            }

            .smile, .flower, .music, .pdf {
                position: absolute; left: 50%; top: 50%;
                background: url(https://www.zhangxinxu.com/study/201503/mobile_1_layer2.png) no-repeat;
                transform: translate(-50%,-50%);
            }
            .smile {
                width: 64px; height: 64px;
                margin: -400px 0 0 -400px;
            }
            .flower {
                width: 268px; height: 229px;
                background-position: 0 -56px;
                margin: -320px 0 0 400px;
            }
            .music {
                width: 114px; height: 114px;
                background-position: -10px -297px;
                margin: -40px 0 0 -300px;
            }
            .pdf {
                width: 130px; height: 120px;
                background-position: -10px -423px;
                margin: 140px 0 0 500px;
            }
        </style>
    </head>
    <body>
        <h1></h1>
        <p><a href="">来源</a></p>
        <div class="demo">
            <div class="box">
                <img src="https://www.zhangxinxu.com/study/201503/mobile_1_iphone.jpg" class="iphone">
                <i class="smile"></i><i class="flower"></i><i class="music"></i><i class="pdf"></i>
            </div>
        </div>
    </body>
</html>